--[=[   
  User: laice
  Date: 10/23/13
  Time: 10:20 AM
]=]

local storyboard = require"storyboard"

storyboard.fonts = {}

if "Win" == system.getInfo( "platformName" ) then
    storyboard.fonts.OCRASTD = "OCR-A"
elseif "Android" == system.getInfo( "platformName" ) then
    storyboard.fonts.OCRASTD = "OCR-A-STD.ttf"
else
    -- Mac and iOS
    --storyboard.fonts.OCRASTD = "OCR-A"
end

local function checkMemory()
    collectgarbage( "collect" )
    local memUsage_str = string.format( "MEMORY = %.3f KB", collectgarbage( "count" ) )
    print( memUsage_str, "TEXTURE = "..(system.getInfo("textureMemoryUsed") / (1024 * 1024) ) )
end

checkMemory()
timer.performWithDelay( 10000, checkMemory, 0 )





-- Code to have Corona display the font names found
--[[
local fonts = native.getFontNames()

count = 0

-- Count the number of total fonts
for i,fontname in ipairs(fonts) do
    count = count+1
end

print( "\rFont count = " .. count )

local name = "OCR"     -- part of the Font name we are looking for

name = string.lower( name )

-- Display each font in the terminal console
for i, fontname in ipairs(fonts) do
    j, k = string.find( string.lower( fontname ), name )

    if( j ~= nil ) then

        print( "fontname = " .. tostring( fontname ) )

    end
end
---------------------------------------------------------
    ]]